package com.designPatterns.decorator;

import org.junit.Test;

/**
 * 测试类
 * Created by houjinxin on 2016/11/27.
 */
public class Client {

    @Test
    public void testDecorator(){
        Component component = new ConcreteComponent();
        Decorator decoratorA = new ConcreteDecoratorA(component);
        decoratorA.doSomething();

        Decorator decoratorB = new ConcreteDecoratorB(decoratorA);
        decoratorB.doSomething();

    }
}
